class RMProj_Blob extends UTProjectile;

/** Scaling factor for IntensityXplier */
var(BlobIntensitySettings) float IntensityScalingFactor;

simulated function Landed( vector HitNormal, actor FloorActor )
{
	HitWall( HitNormal,FloorActor,none);
	//MakeNoise(1.0);
	SpawnExplosionEffects(Location, HitNormal);
	//Explode(Location,  vect(0,0,0));
	ShutDown();
}

simulated event HitWall(vector HitNormal, Actor Wall, PrimitiveComponent WallComp)
{
	local Vector NewVelocity;
	local KActor SkAct;
	//local TraceHitInfo HitInfo;
	NewVelocity = Normal(Location - Instigator.Location);
	Instigator.SetPhysics(PHYS_Falling);
	Instigator.Velocity += RMPawn(Instigator).BlobIntensity * IntensityScalingFactor * NewVelocity;
	foreach VisibleActors( class'KActor', SkAct, 3000.0 )
	{
		SkAct.SetPhysics(PHYS_Falling);
		SkAct.Velocity += RMPawn(Instigator).BlobIntensity * IntensityScalingFactor * Normal(Location - SkAct.Location);
		SkAct.bCollideWorld = true;
		SkAct.bBounce = true;
		//SkAct.ApplyImpulse(Normal(Location - SkAct.Location), RMPawn(Instigator).BlobIntensity * IntensityScalingFactor,
	}
	//MakeNoise(1.0);
	SpawnExplosionEffects(Location, HitNormal);
	ShutDown();
}

defaultproperties
{
	MaxEffectDistance = 2000
	IntensityScalingFactor = 3000
	Speed=2500
	MaxSpeed=8000
	AccelRate=1000
	Damage = 200
	DamageRadius = 500
	MomentumTransfer = 500000
	CheckRadius = 0
	Physics = PHYS_Projectile
	bProjTarget = true
	bBounce = false
	RotationRate=(Roll=50000)
	TossZ=0.0 //toss height
	bSwitchToZeroCollision = false
	ProjFlightTemplate=ParticleSystem'WP_RocketLauncher.Effects.P_WP_RocketLauncher_Smoke_Trail'
	ProjExplosionTemplate=ParticleSystem'WP_ShockRifle.Particles.P_WP_ShockRifle_Explo'
	ExplosionLightClass=class'UTGame.UTRocketExplosionLight'
	ImpactSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_GrenadeFloor_Cue'
	ExplosionSound=SoundCue'A_Weapon_RocketLauncher.Cue.A_Weapon_RL_Impact_Cue'
	ExplosionDecal=MaterialInstanceTimeVarying'WP_RocketLauncher.Decals.MITV_WP_RocketLauncher_Impact_Decal01'
	MyDamageType = class'UTDmgType_Rocket'
}